package com.fxsh168.server.utils;

import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.PopupWindow;
import android.widget.TextView;

import com.fxsh168.server.R;

import static android.content.Context.LAYOUT_INFLATER_SERVICE;

public class PopInfo extends PopupWindow {
    //           修改昵称
    View view;
    TextView okRead, showText;


    public PopInfo(Context mContext, View parent, String showTextInfo, View.OnClickListener onClickListener) {
        LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE);
        view = inflater.inflate(R.layout.popwin_show_info, null);
        setWidth(ViewGroup.LayoutParams.MATCH_PARENT);
        setHeight(ViewGroup.LayoutParams.MATCH_PARENT);
        setFocusable(true);
        setOutsideTouchable(true);
        setContentView(view);
        showAtLocation(parent, Gravity.BOTTOM, 0, 0);
        update();

        okRead = (TextView) view.findViewById(R.id.teOk);
        showText = (TextView) view.findViewById(R.id.teInfo);
        showText.setText(showTextInfo);
        okRead.setOnClickListener(onClickListener);
    }


}
